import 'package:amap_flutter_location/amap_flutter_location.dart';
import 'package:flutter/material.dart';
import 'dart:io';
import 'package:flutter/services.dart';
import 'package:frametrim/utility/SpUtils.dart';
import 'package:frametrim/utility/sp_utils.dart';
import 'app_scene.dart';
import 'package:intl/intl.dart';
import 'package:intl/date_symbol_data_local.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';

void main() {
  // print("SharedPreferences初始化$success");
  //初始化设置 LogUtil
  LogUtil.init(tag: "Log==", isDebug: true, maxLen: 1000);

  //初始化Formatter
  // initializeDateFormatting();
  //指定locale并格式化日期2020-11-20
  // print(DateFormat('EEE', "zh_CN").format(DateTime.now()));
  //为安卓设置状态栏颜色
  if (Platform.isAndroid) {
    SystemUiOverlayStyle systemUiOverlayStyle =
        SystemUiOverlayStyle(statusBarColor: Colors.transparent);
    SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
  }
  //Loading插件
  configLoading();


  // SPUtil.init();
  runApp(AppScene());
}


//加载框
void configLoading() {
  EasyLoading.instance
    ..displayDuration = const Duration(milliseconds: 2000)
    ..indicatorType = EasyLoadingIndicatorType.fadingCircle
    ..loadingStyle = EasyLoadingStyle.light
    ..indicatorSize = 30.0
    ..radius = 10.0
    ..fontSize = 15
    ..textColor = Colors.black12
    ..progressColor = Colors.yellow
    ..backgroundColor = Colors.green
    ..indicatorColor = Colors.yellow
    ..textColor = Colors.yellow
    ..maskColor = Colors.blue.withOpacity(0.5)
    ..userInteractions = true
    ..dismissOnTap = false;
  // ..customAnimation = CustomAnimation();
}
